import ExpressFactory from './core/ExpressFactory';
import logger from './utils/logger';
// @ts-ignore
import initSocket from './AppOption/initSocket';
import config from './config/index';
import startConfig from "./startConfig";

async function bootstrap() {
    // 创建应用和服务器
    const { app, server } = ExpressFactory.create();
    const PORT = config.BASE_CONFIG.port;
    // 启动服务器
    server.listen(PORT, () => {
        logger.info(`App is running at http://127.0.0.1:${PORT}`);
    });
    initSocket(server);
}

bootstrap();

